import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
// import bill from '@/components/bill'
import billdetail from '@/components/createdBill/billdetail'
import createdBill from '@/components/createdBill/createdBill' //创建流水单
import paydetail from '@/components/createdBill/paydetail' //流水单支付
import upBill from '@/components/createdBill/upBill' //流水单升单


import indexPage from '@/components/indexPage/indexPage'
import bookingDetail from '@/components/booking/bookingDetail'
import bookingDelete from '@/components/booking/bookingDelete'
import addProgram from '@/components/addProgram/addProgram' //添加项目
import Programall from '@/components/addProgram/addProgramall' //添加项目
import programDetail from '@/components/addProgram/programDetail' //项目详情
import login from "@/components/login/login";
import erweima from "@/components/safety_beauty/erweima";
import writeofflist from "../components/writeOff/writeOfflist";

import dataAnalysis from "../components/dataAnalysis/dataAnalysis"; //数据分析
import cooperateList from "../components/cooperate/cooperateList"; // 合作协议列表
import insurance from "../components/Insurance/Insurance"; // 甄美保 保险页面

import pintuan from '@/components/pintuan/pintuan' //拼团
import ptDetail from '@/components/pintuan/ptDetail'
import sdan from '@/components/pt_sdan/sdan' //拼团升单
import hx from '@/components/hx/hexiao'



import setting from '@/components/setting/setting'
import editPassword from '@/components/setting/editPassword'

import authentication from '@/components/createdBill/authentication' //实名认证
import refereesAuth from '@/components/createdBill/refereesAuth' //推荐人认证
import cardCancel from '@/components/cardCancel/index' //卡券核销
import traditionalForm from '@/components/traditionalForm/traditionalForm'
import searchResult from '../components/searchResult/searchResult' //查询结果
import formHexiao from '../components/formHexiao/formHexiao' //查询结果
import createForm from '../components/createForm/createForm' //创建传统报单

Vue.use(Router)

export default new Router({
    routes: [
        // 登录
        {
            path: '/login',
            component: login
        },
        // 登录页
        {
            path: '/',
            component: index
        },

        //配置页面
        {
            path: '/setting',
            component: setting
        },
        //修改密码
        {
            path: '/editPassword',
            component: editPassword
        },

        // 流水单详情
        {
            path: '/billdetail',
            component: billdetail
        },
        {
            path: '/billdetail:id',
            name: 'billdetail',
            component: billdetail
        },
        //流水单支付详情
        {
            path: '/paydetail:id',
            name: 'paydetail',
            component: paydetail
        },
        //流水单升单页面
        {
            path: '/upBill:id',
            name: 'upBill',
            component: upBill
        },
        // 创建流水单
        {
            path: '/createdBill:id',
            component: createdBill,
            meta: {
                keepAlive: true
            }
        },
        // 首页
        {
            path: '/indexPage',
            component: indexPage,
            meta: {
                keepAlive: true
            }
        },
        // 预约单详情
        {
            path: '/bookingDetail',
            component: bookingDetail
        },
        {
            path: '/bookingDetail:id',
            component: bookingDetail
        },
        // 关闭预约单
        {
            path: '/bookingDelete',
            component: bookingDelete
        },
        {
            path: '/bookingDelete:id',
            component: bookingDelete
        },
        // 添加项目
        {
            path: '/addProgram',
            component: addProgram
        },
        {
            path: '/addProgram:id',
            component: addProgram
        },
        // 添加项目（全款）
        {
            path: '/Programall',
            component: Programall
        },
        {
            path: '/Programall:id',
            component: Programall
        },
        // 项目详情
        {
            path: '/programDetail',
            component: programDetail
        },
        {
            path: '/programDetail:id',
            component: programDetail
        },
        {
            path: '/erweima',
            component: erweima
        },
        {
            path: '/erweima:url',
            component: erweima
        },
        {
            path: '/writeofflist',
            component: writeofflist
        },
        {
            path: '/dataAnalysis',
            component: dataAnalysis,
            meta: {
                keepAlive: true
            }
        },
        {
            path: '/cooperateList/:order_id/:id',
            component: cooperateList,
            name: 'cooperateList'
        },
        {
            path: '/insurance',
            component: insurance
        },
        //拼团
        {
            path: '/pintuan',
            component: pintuan,

        },
        {
            path: '/ptDetail:id',
            component: ptDetail
        },
        //拼团升单
        {
            path: '/pt_sdan',
            component: sdan,
            meta: {
                keepAlive: false
            }
        },
        //核销
        {
            path: '/hx',
            component: hx
        },
        // 实名认证
        {
            path: '/authentication:id',
            component: authentication
        },
        //推荐人认证
        {
            path: '/refereesAuth:id',
            component: refereesAuth
        },


        // 卡券核销
        {
            path: '/cardCancel:id',
            component: cardCancel
        },
        // 查询结果
        {
            path: '/searchResult',
            component: searchResult
        },
        // 传统报单核销
        {
            path: '/formHexiao',
            component: formHexiao
        },
        // 创建报单
        {
            path: '/createForm',
            component: createForm
        },
        // 
        {
            path: '/traditionalForm',
            component: traditionalForm
        },
    ]
})